#ifndef BRDF_PHONG_H
#define BRDF_PHONG_H
#include "bsdf.h"

namespace gemren
{
	class brdf_phong : public brdf_diffuse
	{
		
	public:
		brdf_phong(): brdf_diffuse(), ks(0.0f), display_ks(0.0f), ns(8.0f), ratio(0.0f){}
		virtual void bounce(random* ran, const scene* sc, intersection* i) const;
		virtual void bounce_fast(random* ran, const scene* sc, intersection* i) const;
		virtual color_s throughput(const coord& incoming, const coord& outcoming, const coord& normal)const;
		virtual bool is_directly_lighted() {return true;}
		virtual void announce_properties(const std::string& prefix, property_announcer announcer);
		virtual float pdf(const coord& incoming, const coord& outcoming, const coord& normal);
	protected:
		virtual err_t set_my_string(std::string& name, const std::string& value);
		virtual err_t set_my_float(std::string& name, const float value);
		float ratio; //specular-to-all
		spectrum_dynamic display_ks;
		color_s ks; //specular, diffuse color
		float ns; //cos exponent
	};
}

#endif